﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Web/BizWeb.Master" AutoEventWireup="true"
    CodeBehind="DailyAccount.aspx.cs" Inherits="Slja.WEB.Finance.DailyAccount" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<%--    <script type="text/javascript" src="/JS/jquery.js"></script>--%>
    <script type="text/javascript" src="/js/DatePicker/WdatePicker.js"></script>
    <style type="text/css">
        #divGVContainer
        {
            width: 100%;
            height: 30px;
        }
        #divGVContainer div
        {
            width: 100%;
            height: 100%;
            overflow: auto;
            position: relative;
        }
        .mygrid{table-layout:auto;border-collapse:collapse;}
        .mygrid th{white-space: nowrap;}
         #tblMain{padding:2px 2px;}
        #tblMain td{padding:0 0;}
        
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <script type="text/javascript">
        function loadPage(type) {
            window.location.href = "datainput.aspx?type=" + type;
        }
        function OutputPage() {
            window.showModalDialog('OutputData.aspx?year='
            + $("#ctl00_ContentPlaceHolder1_drpYear").val()
            + "&month=" + $("#ctl00_ContentPlaceHolder1_drpMonth").val()
            + "&rdm=" + Math.random()
            );
        }
        function ValidForm() {
            var rd1 = $("#ctl00_ContentPlaceHolder1_rdbDayQuery");
            if(rd1.prop("checked") &&(!$("#ctl00_ContentPlaceHolder1_tbxStart").val()||
                    !$("#ctl00_ContentPlaceHolder1_tbxEnd").val())
               ){
                alert("请选择起止日期！");
                return false;
             }
             return true;
         }
         function QueryTypeChange(rd) {//alert(1234);
        // debugger;
             $("span[dname='ctainer']").prop("disabled", "disabled");
             if ($(rd).prop("checked")) {
                 $("span",$(rd).parent()).removeAttr("disabled");
             }
         }
    </script>
    <br />
    <table id="tblMain" border="0" cellpadding="0" cellspacing="0" style="background-color: #f6f9fe; border: 1px solid rgb(192,210,252);
        padding: 5px; width: 97%; margin: 5px 5px;">
        <tr>
            <td>
                <h4 style="text-align: center; width: 1000px;margin:0 0;">
                    合约统计</h4>
            </td>
        </tr>
        <tr>
            <td>
                <div>
                    输入项：
                    <input type="button" id="btnReceivableAcco" value="应收" onclick="loadPage('Receivable');"
                        class="btnblue1" />&nbsp;&nbsp;
                    <input type="button" id="btnPayableAcco" value="应付" onclick="loadPage('Payable');"
                        class="btnblue1" />&nbsp;&nbsp;
                    <input type="button" id="btnCheckingAcco" value="项目核算" onclick="loadPage('Checking');"
                        class="btnblue1" />
                </div>
            </td>
        </tr>
        <tr>
            <td>
                <div style="width: 100%;">
                    <ul style="list-style-type:none;margin:0 0;">
                       
                        <li><asp:RadioButton runat="server" ID="rdbDayQuery" GroupName="QueryType" Text="按日期：" Checked="true" onclick="QueryTypeChange(this);" />
                        <span id="spDayQuery" dname="ctainer">从<asp:TextBox ID="tbxStart" runat="server" class="Wdate" onFocus="WdatePicker({skin:'whyGreen'})" style="width:100px;"></asp:TextBox>
                            到<asp:TextBox ID="tbxEnd"  runat="server" class="Wdate" onFocus="WdatePicker({skin:'whyGreen'})" style="width:100px;"></asp:TextBox></span>
                        </li>
                         <li><asp:RadioButton runat="server" ID="rdbMonthQuery" GroupName="QueryType" Text="按月份： " onclick="QueryTypeChange(this);" />
                          <span id="spMonthQuery" dname="ctainer" disabled="disabled">年份：<asp:DropDownList runat="server" ID="drpYear">
                            <asp:ListItem Text="2011" Value="2011"></asp:ListItem>
                            <asp:ListItem Text="2012" Value="2012" Selected="True"></asp:ListItem>
                            <asp:ListItem Text="2013" Value="2013"></asp:ListItem>
                            <asp:ListItem Text="2014" Value="2014"></asp:ListItem>
                        </asp:DropDownList>
                            <asp:DropDownList runat="server" ID="drpMonth">
                            </asp:DropDownList></span>
                        </li>
                    </ul>
                    <div class="clear">
                    </div>
                </div>
            </td>
        </tr>
        <tr>
            <td>
                <div style="text-align: center;" id="divGVContainer">
                    <asp:Button runat="server" ID="btnGenerate" Text="统计" class="btnblue1" OnClientClick="return ValidForm();" />
                    <asp:Button runat="server" ID="btnOutput" Text="导出" Visible="false" class="btnblue1" />
                </div>
            </td>
        </tr>
    </table>
    <br />
    <div style="width:97%; height:auto;overflow:auto;position:absolute;padding:2px 2px;">
        <asp:GridView CssClass="mygrid" runat="server" ID="GridView1" SkinID="GridViewAuto" ViewStateMode="Disabled">
        </asp:GridView>
        <br />
    </div>
    
</asp:Content>
